<html>
<head>
    <title>地址解析测试</title>
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<script type="text/javascript">
    function getData() {
        var address = document.getElementsByName("address")[0].value;
        var json = {};
        json.address = address;
        $.ajax({
            url: "http://192.168.207.28:8080/address/parse",//请求地址
            contentType: "application/json", //必须这样写
            type: "POST",
            dataType: "json",
            data: JSON.stringify(json),
            success: function (data) {//执行完成返回的数据
                document.getElementsByName("result")[0].value = JSON.stringify(data, null, 2)
            }
        });
    }
</script>
<body>
<div style="text-align: center;">
    <form>
        <table border="1" bordercolor="black" cellpadding=10 cellspacing=0 width=800 style="margin: auto">
            <!-- 由此可见，<th>和<td>标签都是用于表格单元格显示的。不同的是<th>在单元格中加粗显示。 -->
            <tr>
                <!-- 占两列 -->
                <th colspan="2">地址解析服务测试</th>
            </tr>
            <tr>
                <td>原始地址</td>
                <td><textarea name="address" rows="5" cols="50" value=""></textarea></td>
            </tr>
            <tr>
                <td>语言代码</td>
                <td><input type="text" name="language" value="zh-cn"/><br/></td>
            </tr>
            <tr>
                <td>解析结果</td>
                <td><textarea name="result" rows="20" cols="50" disabled="disabled"></textarea></td>
            </tr>
            <tr>
                <th colspan="2">
                    <input type="button" value="开始解析" onClick="getData()"/>
                    <input type="reset" value="重置"/>
                </th>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
